#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H



#include <QMainWindow>

#include <QDebug>
#include <QPainter>
#include <QPixmap>
#include <QMouseEvent>
#include <block.h>
#include <QTimer>
#include <QMessageBox>
#include <qmessagebox.h>
#include <dialog.h>

//定义常量
#define BLOCK_LENGTH 50
#define BLOCK_HEIGH 50
#define ELENUM_LENGHT 20
#define EXPRESSION_LENGHT 70
#define EXPRESSION_HEIGH 70
#define TTILE_BEGIN 900
#define TITILE_HEIGH  900



namespace Ui {
class GameWindow;
}

class GameWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit GameWindow(QWidget *parent = nullptr);
    ~GameWindow();


public slots:
    void on_classic_press();
    void on_simple_press();
    void on_medium_press();
    void on_experts_press();
    void on_theCustom_press();



signals:
    void return_mainwindow();


private:
    Ui::GameWindow *ui;
    QTimer * runtime;
    Dialog * useDefineWindows;
private slots:
    void on_secondadd();

protected:
    virtual void paintEvent(QPaintEvent *event);
    virtual void mousePressEvent(QMouseEvent *event);

};

void showblock(int x,int y);
int iswin();
void restart(int row,int col,int boolnum);
void painttitle(QPainter * painter);
void paintboom(QPainter * painter);
void createinterface();


#endif // GAMEWINDOW_H
